{include common/header}
{include common/left}
<div id="content">    
  <ul class="breadcrumb">
    <li><a href="javascript:;"><i class="icon-home"></i>添加房源</a> </li>
   </ul>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
          <div class="widget-title"> 
            <h5><span class="icon"> <i class="icon-align-justify"></i> </span>添加房源</h5>
          </div>
          <div class="widget-content nopadding">
            <form action="{url('estate/add')}" method="post" class="form-horizontal">
            {if $type==1}
              <div class="control-group">
                <label class="control-label">地址</label>
                <div class="controls">
                  <input name="address" type="text" />
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">楼层</label>
                <div class="controls">
                  <input type="text" name="floor">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">户型</label>
                <div class="controls">
                  <select name="apartment">
                  {loop $apartment $val}
                  <option value="{$val['id']}">{$val['name']}</option>                  
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">面积</label>
                <div class="controls">
                  <input type="text" name="area">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">装修</label>
                <div class="controls">
                  <select name="decoration">
                  {loop $decoration $val}
                  <option value="{$val['id']}">{$val['name']}</option>                   
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">备注</label>
                <div class="controls">
                  <input type="text" name="remark">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">月租</label>
                <div class="controls">
                  <input type="text" name="rent">
                </div>
              </div>
              {if $_G['member']['usergroup'] ==1}
              <div class="control-group">
                <label class="control-label">网号</label>
                <div class="controls">
                  <input type="text" name="netid">
                </div>
              </div>
              {/if}
              <div class="control-group">
                <label class="control-label">租否</label>
                <div class="controls">
                  <select name="rented">                  
                  <option value="0">否</option>                  
                  <option value="1">是</option>
                  </select>
                </div>
              </div>
              {elseif $type==2}
              <div class="control-group">
                <label class="control-label">地址</label>
                <div class="controls">
                  <input name="address" type="text" />
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">楼层</label>
                <div class="controls">
                  <input type="text" name="floor">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">户型</label>
                <div class="controls">
                  <select name="apartment">
                  {loop $apartment $val}
                  <option value="{$val['id']}">{$val['name']}</option>                  
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">面积</label>
                <div class="controls">
                  <input type="text" name="area">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">权属</label>
                <div class="controls">
                  <select name="certificate">
                  {loop $certificate $val}
                  <option value="{$val['id']}">{$val['name']}</option>                   
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">结构</label>
                <div class="controls">
                  <select name="structure">
                  {loop $structure $val}
                  <option value="{$val['id']}">{$val['name']}</option>                   
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">装修</label>
                <div class="controls">
                  <select name="decoration">
                  {loop $decoration $val}
                  <option value="{$val['id']}">{$val['name']}</option>                   
                  {/loop}
                  </select>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">备注</label>
                <div class="controls">
                  <input type="text" name="remark">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">售价</label>
                <div class="controls">
                  <input type="text" name="rent">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">网号</label>
                <div class="controls">
                  <input type="text" name="netid">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">售否</label>
                <div class="controls">
                  <select name="rented">                  
                  <option value="0">否</option>                  
                  <option value="1">是</option>
                  </select>
                </div>
              </div>
              {/if}
        
              <div class="form-actions">
              <input type="hidden" name="type" value="{$type}">
                <input type="submit" class="btn btn-primary" value="确认">
              </div>
            </form>
          </div>
        </div>
        
      </div>
    </div>
  </div>
</div>
{include common/footer}